import React from 'react'

import {Empty} from 'antd'

import {Container} from './style'

function MyCard(props){
    const {title, children, style, notTitle, extra} = props
    return (
        <Container style={style}>
            {
                notTitle ? '' :
                <div className="card-title">
                    <div className="title">{title}</div>
                    <div className="extra">{extra}</div>
                </div>
            }
            <div className="card-body">
                {children ? children : <Empty style={{margin: '24px 0'}} description={false} />}
            </div>
        </Container>
    )
}

export default MyCard